﻿using System;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;

namespace Moonlite.Modules.Editors.DataTools
{
    internal static class XmlTreeViewDefaultIcons
    {
        public const int AllIconImageIndex = 0;
        public const int AttributeIconImageIndex = 1;
        public const int ChoiceIconImageIndex = 2;
        public const int ElementIconImageIndex = 3;
        public const int NameSpaceIconImageIndex = 4;
        public const int SequenceIconImageIndex = 5;
        private static ImageList imageList;
        public static ImageList ImageList
        {
            get
            {
                return imageList;
            }
        }

        static XmlTreeViewDefaultIcons()
        {
            imageList = new ImageList();
            Assembly assembly = typeof(XmlTreeViewDefaultIcons).Assembly;
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_AllIcon.png")));
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_AttributeIcon.png")));
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_ChoiceIcon.png")));
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_ElementIcon.png")));
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_NameSpaceIcon.png")));
            imageList.Images.Add(Image.FromStream(assembly.GetManifestResourceStream("Moonlite.Modules.Editors.DataTools.Resources.Icons.XML_SequenceIcon.png")));
        }
    }
}
